﻿CREATE PROCEDURE [dbo].[yaf_pmessage_info]
AS
    BEGIN
        SELECT NumRead = (SELECT COUNT(1)
                          FROM   yaf_UserPMessage
                          WHERE  IsRead <> 0),
               NumUnread = (SELECT COUNT(1)
                            FROM   yaf_UserPMessage
                            WHERE  IsRead = 0),
               NumTotal = (SELECT COUNT(1)
                           FROM   yaf_UserPMessage)
    END


